package feedsec;
abstract class Animal {
	public void eat(){
		
	}
	public abstract void toeat();
}
class Lion extends Animal{
	 private String food;
	
	 public Lion(){
		 
	}
	public Lion(String food){
		
		this.food=food;
	}
	public void toeat() {
		System.out.println( "lion eat "+ food);
	}
}
class Monkey extends Animal{
	 private String food;
	 private int num;
	 static int count;
	 static{
		 count=0;
	 }
	 public Monkey(){
		 
	 	}
	public Monkey(String food){
		this.food=food;
		setNum(count++);
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public void eat(){
		
	}
	public void toeat() {
		System.out.println("Monkey,No:"+this.num+" eat " + food);
	}
}
class Pigeon extends Animal{
	 private String food;
	 private int num;
	 static int icount;
	 static{
		 icount=1000;
	 }
	public Pigeon(){
			 
		 }
	public Pigeon(String food){
		setNum(icount++);
		this.food=food;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public void eat(){
		
	}
	public void toeat() {
		System.out.println("Pigeon,No:"+this.num+" eat "+ food);
	}
}
